<?php
/**
 * @desc   Created by PhpStorm.
 * @author laowng
 * @since  2018/10/24 8:51
 */

namespace app\admin\service;

use app\admin\model\AdminUserModel;

class UserService
{
    private $_user;

    public function __construct(AdminUserModel $user_model)
    {
        $this->_user = $user_model;
    }

    /**
     * @param $where
     * @param int $page
     * @return \think\Paginator
     * @throws \think\exception\DbException
     */
    public function userList($where, $page = 10)
    {
        $data = $this->_user->where($where)->paginate($page);
        return $data;
    }

}